﻿<!--#include file="include/config.asp"-->
<!--#include file="include/conn_f.asp"-->
<!--#include file="top.asp"-->
<!--#include file="left.asp"-->
<center>
    <%
oldpwd=left(request("oldpwd"),15)
newpwd=left(request("newpwd"),10)
newpwd2=left(request("newpwd2"),10)
If newpwd<>newpwd2 Then
    Response.Write "两次输入的新密码不相同!"
    Response.End
End If
If Session("cust_id")="" Then
    Response.Write "登录超时,请重新登录!"
    Response.End
End If
sql="select cust_id from customer where cust_id="&Session("cust_id")&" and password=old_password('"&oldpwd&"')"
Set rs=conn.execute(sql)
If Not rs.eof Then
    sql2="update customer set password=old_password('"&newpwd&"') where cust_id="&Session("cust_id")
    conn.execute sql2
    Response.Write "密码更改成功!"
Else
    Response.Write "原密码不对!"
End If
    %>
</center>
<!--#include file="bottom.asp"-->
